﻿<!DOCTYPE html>
<html>
<head>
    <meta charset="utf-8" />
    <title>新建系统</title>
    <meta name="viewport" content="width=device-width, initial-scale=1, maximum-scale=1, user-scalable=no" />
    <link rel="stylesheet" type="text/css" href="../Portal/layui/css/layui.css">
    <!--- 引入代码. -->
    <!--<script src="../Scripts/jquery/jquery.min.js"></script>-->
    <script type="text/javascript" src="../Scripts/bootstrap/js/jquery.min.js"></script>

    <script src="../Scripts/QueryString.js" type="text/javascript"></script>
    <script src="../Scripts/config.js" type="text/javascript"></script>
    <script src="../Comm/Gener.js" type="text/javascript"></script>
    <style>
        .td-required-next:after {
            top: 17px;
            right: 5px;
            color: red;
            content: '*';
            position: absolute;
            margin-left: 4px;
            font-weight: 700;
            line-height: 1.8em;
        }
    </style>

    <script type="text/javascript">
        $(function () {


        });

        function Save() {

            $("#Btn_Save").attr({ "disabled": "disabled"}); 
          
            var name = $("#TB_Name").val();
            if (name == null || name == undefined || name == "") {
                alert("请输入系统名称");
                $("#Btn_Save").removeAttr("disabled");
                return;
            }

            var model = $("#TB_1").val();
            if (model == null || model == undefined || model == "") {
                alert("请输入模块名称");
                $("#Btn_Save").removeAttr("disabled");
                return;
            }

            var handler = new HttpHandler("BP.WF.HttpHandler.WF_GPM");
            handler.AddUrlData();
            handler.AddFormData();

            var data = handler.DoMethodReturnString("NewSystem_Save");
            if (data.indexOf('err@') == 0) {
                alert(data);
                return;
            }

            alert("创建系统成功，您需要为模块创建菜单");


            var url = "../Comm/En.htm?EnName=BP.CCFast.CCMenu.MySystem&No=" + data;
            SetHref(url);

            //    /WF/Comm / RefFunc / EnOnly.htm ? EnName = BP.CCFast.CCMenu.MySystem & No=AppFlow & s=0.5017031840109709
            // SetHref( "./CreateMenu/Default.htm?ModuleNo="+data;
            //   SetHref( "Menus.htm?ModuleNo=" + data;

        }
    </script>
</head>
<body>
    <div class="layui-container">
        <form id="CCForm" name="CCForm">


            <h3 style=" margin-top:15px;">系统名称：(最好不要超过6个汉字)</h3>

            <table class="layui-table" lay-skin="nob">
                <tr>
                    <td class="td-required-next">
                        <input type="text" placeholder="比如：车辆管理、固定资产管理" id="TB_Name" name="TB_Name" class="layui-input" />

                    </td>
                </tr>
            </table>

            <table class="layui-table" lay-skin="nob">

                <tr>
                    <td># </td>
                    <td colspan="2">模块名称: （不超过8个汉字） </td>

                </tr>

                <tr>
                    <td>1 </td>
                    <td class="td-required-next"> <input type="text" id="TB_1" name="TB_1" class="layui-input" /></td>
                    <td class="layui-form-mid layui-word-aux">比如：车辆台账 </td>
                </tr>
                <tr>
                    <td>2 </td>
                    <td> <input type="text" id="TB_2" name="TB_2" class="layui-input" /> </td>
                    <td class="layui-form-mid layui-word-aux">比如：司机管理 </td>

                </tr>
                <tr>
                    <td>3 </td>
                    <td> <input type="text" id="TB_3" name="TB_3" class="layui-input" /> </td>
                    <td class="layui-form-mid layui-word-aux">比如：费用管理 </td>

                </tr>
                <tr>
                    <td>4 </td>
                    <td> <input type="text" id="TB_4" name="TB_4" class="layui-input" /> </td>
                    <td class="layui-form-mid layui-word-aux">比如：报表查询 </td>
                </tr>
                <tr>
                    <td>5 </td>
                    <td> <input type="text" id="TB_5" name="TB_5" class="layui-input" /> </td>
                    <td class="layui-form-mid layui-word-aux">比如: 系统管理 </td>
                </tr>

                <tr>
                    <td colspan="3">后续可以增加 </td>
                </tr>
            </table>

            <input id="Btn_Save" type="button" onclick="Save();" class="layui-btn" value="下一步" />

        </form>
    </div>
</body>
</html>